1/1
FW: exchanging data trough the Ethernet card.
by Unknown on Jun 24, 2008 |
Not available! | ||
Hi Andrea,
Your question looks familier to me as I had the same issue some time
back when trying to communicate with a PIC Micro from PC using
Ethernet. I really wanted to drop all the TCP / IP stack stuff and get
the ethernet frame across.
But from what I learnt and experienced, you may need to do lot of
tweaks to by-pass the TCP / IP stack of the operating system first.
Simply, what gets passed to an application running on top of a generic
OS with generic drivers, is the payload of either TCP or UDP packet.
Hence, you may first have to write your own sockets / drivers to get
raw data from the NIC of your PC. Again the MAC and PHY of the NIC
comes embedded inside the controller. (Jeepers! you can't strip them
off). So the maximum depth you can go to, is the MAC layer, provided
that you do all these tweaks. For the same, you may have to have the
stack upto the MAC layer implemented in the FPGA as well....
Have a nice day!!
Thaya.
----- Original Message -----
From: "NewsGroup" nbase at n...>
To: ethmac at o...>
Date: Thu, 24 Aug 2000 09:33:20 -0700
Subject: RE: [ethmac] FW: exchanging data trough the Ethernet card.
24-Aug-00
Hi,
Both question depend on your card.
Most likely the ful duplex can be change by software as you most
likely have
a register in the card that you write to it telling the card wether
to work
in full duplex or half duplex.
now days I belive everyone make the Ethernet interface to work in
both mode
just as all new 100 are actually 10/100 simple because it is almost
the same
effort.
If I understand your second question you would like to send short
packet
with are shorter than what the Ethernet standart allow.
in general this can sure be done just as you can shronk the
preamble in the
"network" you will have the "big" question is will your card
support it !.
many card will filter all packet that are short than 64 and simple
reject
them and rais an error flag, and on the other direction in many
cases the
card will add padding to get the minimum size.
so if I understand right what you want to do , you will need to
find a card
that will forward to the cpu even fragment packets as well as
"agree" to
send short packet to the line. and if you don't find such card I
guess you
will have to design one.
have a nice day
Illan
-----Original Message-----
From: owner-ethmac at o...
[/cgi-bin/post.cgi?cmd=new&to=owner-ethmac%20at%20opencores%20dot%20org&msg=/ml-archive/archives/ethmac/0008/msg00010.shtml
Behalf Of Andrea Aizza
Sent: Wednesday, August 23, 2000 8:13 AM
To: Jean-François Larin
Cc: ethmac at o...
Subject: Re: [ethmac] FW: exchanging data trough the Ethernet card.
Dear Jean-Francois,
thank you for your help. I have some further comments:
On 23-Aug-00 Jean-François Larin wrote:
> Dear OPENCORE friends,
> > I have never worked with Ethernet protocol but I need about 15Mbps from an
> FPGA
> device and a PC. One idea I thought today to implement a `null modem` based
> connection from the PC to the device (just two devices -
no hubs or friends)
> I
> have just 2 questions: > > 1) Assuming they claim 10/100Mbps on those Eth cards, can you really reach
> those speeds?
> > Ethernet works in half duplex and in full duplex. If you are working in half
> duplex, then only one device can speak on the wire at the same
time, so you
> get
> 10/100 Mbps. But when 2 device start to transmit on the wire on the same
> time,
> there is a collision and both have to retry. If there is litte traffic,
> there is
> little collisions. When more traffic gets in you get more collision. I've
> heard
> that you reach at peak at about 30% of utilisation (3/30 Mbps) If you try to
> use
> more bandwidth, you get too much collision and the actual bandwidth decrease.
>
> But since you only use 2 devices, you can use full duplex (if you use a
> unshielded
> twistet pairs (similar to telephone jack in north america). Full duplex is
> not
> supporter on co-axial cable (afaik). Then you get a real 100Mbs.
>
I understood that, is the full duplex mode something you set by software? In fact hat i have to do is a hardware part and a software one.
> In fact, you never get 100 percent of the 100Mbs. Every
packet has a 12
> bytes of
> addresses, 2 bytes for type and 4 bytes for CRC. The total packet lenght
> must be
> between 64 bytes or 1518 bytes. between each packet, there is some overhead
> equivalent to 20 bytes (12 for inter-packet gap and 8 for
pre-amble). So if
> you use
> large packets (because you actually have lot of information to send), the
> overhead
> (12+2+4+20) is negligible compared to 1518 bytes, so you get almost 100Mbs of
> true
> bandwidth. If you use full duplex, you get all this bandwith 'guaranteed'
> because
> there is no collision. that is as far as Ethernet is concerned. You Eth
> Card must
> be of good design. Maybe the cheap (old) cards use I/O access to transfer
> the
> packets. Then your CPU is going to be the limitations. no problem with the card, we can buy a new one if our is not enought good. What I do not understood here is: if I attach the ethernet rj45 cable to my FPGA (just thos etwo devices) and I write some HDL code in such a way that it sends on that serial ethernet link a packet of lets say 1000 bytes, well formatted (using the right system info - header, addresses..., and obviuosly the right frequency) is it there the way to read it by writing some software on the PC? And on the other way, if I write some software, can I send just a packet on the ethernet in such a way that I can read it in my FPGA? I think this is what I need to do! Thank you again for your help. Have a great week, Andrea.
>
> Note also that Ethernet is not like a null modem. You have to send data in
> packets.
> You can't just send a single caracter on the wire.
>
> good luck
>
>
> --
>
> ************************************************************
> Jean-Francois Larin ing. stag.
> FPGA design
> Network Products Group
> Matrox Electronic Systems
> 1055 St. Regis Blvd.
> Dorval, Quebec, Canada
> H9P 2T4
> Tel:(514)685-7230 ext. 2041
> Fax:(514)822-6272
> E-Mail: JeanFrancois.Larin at m...
> ************************************************************
>
----------------------------------------
Andrea AIZZA
----------------------------------------
Swiss Federal Institute of Technology
Department of Electrical Engineering
Integrated Systems Center (LSI)
EPFL-DE-LSI Office: ELB-137
Ecublens, CH-1015 Lausanne (CH)
tel. +41 21 693 69 73
fax. +41 21 693 46 63
email Andrea.Aizza at e...
http://lsiwww.epfl.ch/
----------------------------------------
|
1/1